<{include file="Public:header" /}>
<div id="page-wrapper">
	<div class="row">
		<div class="col-lg-12">
			<h1 class="page-header" style="margin-top: 0px;"></h1>
		</div>
		<!-- /.col-lg-12 -->
	</div>
	<div class="row">
		<div class="col-lg-12">
			<div class="panel panel-default">
				<div class="panel-heading">
					<b>设备位置标注</b>
				</div>
				<!-- /.panel-heading -->
				<div class="panel-body">
					<div class="dataTable_wrapper">
						<div id="dataTables-example_wrapper"
							class="dataTables_wrapper form-inline dt-bootstrap no-footer">
							<div class="row">

								<div class="col-sm-6">
									<form action="<{:Url('Apposition/floor')}>" method="get">
										<div class="dataTables_filter">
											<label>选择广场:</label> <select name="campus_id" id="campus_id"
												class="required">
												<option value="">请选择广场</option> <{volist name='squarelist'
												id='vo' }>
												<option value="<{$vo.id}>">
															<{$vo.campus_name}>
														</option> <{/volist}>
											</select>

											<button class='btn btn-primary'>查询</button>

										</div>
									</form>
								</div>
							</div>
							<div class="row">
								<div class="col-sm-12">
									<table
										class="table table-striped table-bordered table-hover dataTable no-footer">
										<thead>
											<tr role="row">
												<!-- <th style="width: 30px;text-align: center;"  >
                                                <input type="checkbox" name="checkedAll" id="checkedAll"/>
                                            </th> -->
												<th tabindex="0" style="width: 40px; text-align: center;">所属城市</th>
												<th style="width: 60px; text-align: center;">广场名称</th>
												<th style="width: 40px; text-align: center;">楼层名称</th>
												<th tabindex="0" style="width: 40px; text-align: center;">操作</th>

											</tr>
										</thead>
										<tbody>
											<{volist name="list" id='vo' }>
											<tr class="gradeA odd" role="row">
												<td><{$vo.location_name}></td>
												<td><{$vo.campus_name}></td>
												<td><{$vo.floor_name}></td>
												<td><a
													href="<{:Url('Apposition/position')}>?floor_id=<{$vo.id}>&campus_id=<{$vo.campus_id}>&building_id=<{$vo.building_id}>">ap位置标注</a>
												</td>

											</tr>
											<{/volist}>

										</tbody>
									</table>
								</div>
							</div>
							<div class="row">
								<div class="col-sm-12">
									<div class='pages'><{$page}></div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<!-- /.panel-body -->
			</div>
			<!-- /.panel -->
		</div>
		<!-- /.col-lg-12 -->
	</div>

</div>

<!-- 此节点内部的内容会在弹出框内显示,默认隐藏此节点-->
<div id="content" class="hide">
	<form class="form-horizontal">
		<div class="row">
			<div class="control-group span8">
				<label class="control-label" style="padding-top: 0px;">登陆名：</label>
				<div class="controls">
					<input type="text" id="username" name="username"
						class="input-normal control-text" style="height: 30px;">
				</div>
			</div>
			<!-- <div class="control-group span8">
            <label class="control-label" style=" padding-top: 0px;">登陆密码：</label>
            <div class="controls">
              <input type="text"  name="password" class="input-normal control-text" style="height:30px;">
            </div>
          </div> -->
			<div class="control-group span8">
				<label class="control-label" style="padding-top: 0px;">登陆密码：</label>
				<div class="controls">
					<input type="text" name='passwd' class="input-normal control-text"
						style="height: 30px;">
				</div>
			</div>
		</div>
	</form>
</div>

<script src="public/js/jquery-1.8.3.min.js" type="text/javascript">
	
</script>
<script type="text/javascript">
	$(function() {
		$location_id = $('#pro').val();
		$city = $('#city');
		$city.empty();
		$
				.ajax({
					type : "post",
					url : "__URL__/ajaxGetAreasByCityId",
					async : true,
					dataType : 'json',
					data : {
						'location_id' : $location_id
					},
					success : function(result) {
						$
								.each(
										result,
										function(index, array) {

											var option = "<option value='" + array['location_id'] + "'>"
													+ array['location_name']
													+ "</option>";
											$city.append(option);
										});
					}
				});
	})
	$('#pro')
			.click(
					function() {
						$location_id = $('#pro').val();
						$city = $('#city');
						$city.empty();
						$
								.ajax({
									type : "post",
									url : "__URL__/ajaxGetAreasByCityId",
									async : true,
									dataType : 'json',
									data : {
										'location_id' : $location_id
									},
									success : function(result) {
										$
												.each(
														result,
														function(index, array) {

															var option = "<option value='" + array['location_id'] + "'>"
																	+ array['location_name']
																	+ "</option>";
															$city
																	.append(option);
														});
									}
								});
					})
</script>

<{include file="Public:footer" /}>
